
from sqlalchemy import Column, Integer, String, \
    Text, ForeignKey, SmallInteger
from sqlalchemy.orm import relationship
from datetime import datetime


from app.models import Base
from app import create_session


class Oplog(Base):
    id = Column(Integer, primary_key=True)  # 记录的id
    ip = Column(String(100))  # 登录的IP
    reason =Column(String(600)) # 操作原因

    admin_id = Column(Integer, ForeignKey('admin.id')) # 所属会员